home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95b.txt / 000063_icon-group-sender _Wed Jun 21 14:00:48 1995.msg < prev    next >
Internet Message Format  |  1995-09-18  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 22 Jun 1995 08:58:58 MST
  2. Date: Wed, 21 Jun 1995 14:00:48 +0300 (WET)
  3. From: Ehud Lamm <mslamm@pluto.mscc.huji.ac.il>
  4. To: Bob Alexander <bobalex@netcom.com>
  5. Cc: icon-group@cs.arizona.edu
  6. Subject: Re: Perl v. Icon
  7. In-Reply-To: <v01520d00ac0ceef8d07d@[199.182.128.92]>
  8. Message-Id: <Pine.A32.3.91.950621135517.61640B-100000@pluto.mscc.huji.ac.il>
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12.  
  13.  
  14.  
  15. On Tue, 20 Jun 1995, Bob Alexander wrote:
  16.  
  17. > For those of you Perl fans who won't touch Icon because it doesn't have
  18. > regular expressions, here's a bulletin:
  19. > There is a full implementation of Perl regular expressions in the Icon
  20. > program library (procs/regexp.icn).
  21. > I am the author of that procedure library -- however, I can count on half
  22. > of the fingers on one hand the number of times that I've used it.  I much
  23. > prefer Icon string scanning, even though it's not as terse.
  24.  
  25. This proves that if you master Icon well enough to program REs in it, you 
  26. don't really need them, and can use Icon's scanning instead. 
  27. No doubt a mjor reason in choosing which method to use is which method 
  28. you know better. :-)
  29.  
  30. An interesting question is what takes longer to learn: Perl's RE or 
  31. Icon's string scanning.
  32. I am not sure there's an answer: it all depends on what program you are 
  33. trying to write. Some are easier in Perl and some in Icon.
  34.  
  35. Another question is which method is easier to read after written.
  36. Icon's way is clearer - but it doesn't force locallity. By this I mean 
  37. that a single scan (for example looking for a sentence with a certain 
  38. structure) can be broken into many procedures and span mulitple lines. 
  39. Usually with a RE you have it all in one place.
  40. On the other hand we can learn the great value of one liners from APL...
  41.  
  42. Ehud Lamm
  43.